#换源
sed -i 's@^\(deb.*stable main\)$@#\1\ndeb https://mirrors.bfsu.edu.cn/termux/termux-packages-24 stable main@' $PREFIX/etc/apt/sources.list
sed -i 's@^\(deb.*games stable\)$@#\1\ndeb https://mirrors.bfsu.edu.cn/termux/game-packages-24 games stable@' $PREFIX/etc/apt/sources.list.d/game.list
sed -i 's@^\(deb.*science stable\)$@#\1\ndeb https://mirrors.bfsu.edu.cn/termux/science-packages-24 science stable@' $PREFIX/etc/apt/sources.list.d/science.list
apt update -y
apt upgrade -y

#安装必要软件
apt install openjdk-17 proot git unzip -y

#下载nukkit服务端
git clone https://gitee.com/ucket/nukkit-for-termux.git

#安装
cd ~/nukkit-for-termux
unzip Minecraft_server_nukkit.zip
rm Minecraft_server_nukkit.zip termux_indtall_nukkit.sh
cd ~
touch start
echo "cd ~/nukkit-for-termux/nukkit ; ./start_mc_server.sh" > start
chmod +x start

echo 安装完成